Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ui): fill repository context into chat sidebar. #1950

Closed
wants to merge 7 commits into from

Conversation

wsxiaoys
Copy link
Member

No description provided.

@wsxiaoys wsxiaoys force-pushed the support-use-repository-context-in-chat branch 2 times, most recently from acf2b09 to b1c0104 Compare April 24, 2024 18:30
@wsxiaoys wsxiaoys requested a review from liangfung April 24, 2024 18:30
Copy link

codecov bot commented Apr 24, 2024

Codecov Report

Attention: Patch coverage is 6.89655% with 27 lines in your changes are missing coverage. Please review.

Project coverage is 56.91%. Comparing base (c965860) to head (380720f).

Files Patch % Lines
crates/tabby-scheduler/src/code/mod.rs 0.00% 17 Missing ⚠️
crates/tabby/src/services/code.rs 0.00% 7 Missing ⚠️
crates/tabby-scheduler/src/index.rs 0.00% 2 Missing ⚠️
...tabby/src/services/completion/completion_prompt.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1950      +/-   ##
==========================================
- Coverage   57.01%   56.91%   -0.10%     
==========================================
  Files         136      136              
  Lines       12376    12401      +25     
==========================================
+ Hits         7056     7058       +2     
- Misses       5320     5343      +23     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@wsxiaoys wsxiaoys force-pushed the support-use-repository-context-in-chat branch from 15aa0c6 to ecd7db7 Compare April 24, 2024 18:50
const numLines = doc.body.split(/\r\n|\r|\n/).length
const fromLine = doc.start_line
const toLine = doc.start_line + numLines - 1
const reference = `\`\`\`${language} is_reference=1 path=${repo}/${doc.filepath} line_from=${fromLine} line_to=${toLine}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const reference = `\`\`\`${language} is_reference=1 path=${repo}/${doc.filepath} line_from=${fromLine} line_to=${toLine}
const reference = `\`\`\`${language} reference_group=1 path=${repo}/${doc.filepath} line_from=${fromLine} line_to=${toLine}

@wsxiaoys wsxiaoys force-pushed the support-use-repository-context-in-chat branch from 2a369b9 to 380720f Compare April 26, 2024 22:08

const tokens = code.split(/[^\w]/).filter(x => x)

// FIXME(jueliang): restrict query with `git_url` of `repo`.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@liangfung as we have git_url from repositoryList, please fill it in a query like
git_url:${gitUrl}, and append it to AND ${gitUrlQuery}

@wsxiaoys wsxiaoys marked this pull request as draft May 17, 2024 22:03
@wsxiaoys wsxiaoys closed this May 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant